#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int arr[10][10] = { {0} };
	int a = 0;
	scanf("%d", &a);
	arr[0][0] = 1;
	int b = 0;
	for (int i = 1; i <= a; i++)
	{
		arr[i][b] = 0;
		int j = 0;
		for (j = 1; j <= i; j++)
		{
			arr[i][j] = arr[i-1][j] + arr[i-1][j-1];
		}
	}
	for (int i = 1; i <= a; i++)
	{
		for (int j = 1; j <=i ; j++)
		{
			printf("%d ", arr[i][j]);
		}
		printf("\n");
	}
	return 0;
}